export default {
  methods: {
    // 判断是否可以显示某个页面级别的按钮
    isShowByMenu(menu) {
      if (!this.$store.state.user.userInfo.roles) {
        return
      }
      const _menu = this.$store.state.user.userInfo.roles.menus

      return _menu.includes(menu)
    },

    // 判断是否可以显示某个页面级别的按钮
    isDelByMenu(points) {
      if (!this.$store.state.user.userInfo.roles) {
        return
      }
      const _points = this.$store.state.user.userInfo.roles.points
      return _points.includes(points)
    }
  }
}
